﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Imaginecup.recycling.Object.Item;
using Microsoft.Xna.Framework;
using Imaginecup.recycling.Object.Entity;
using Microsoft.Xna.Framework.Graphics;
using Imaginecup.Engine;

namespace Imaginecup.recycling.Object.Menu
{
    public abstract class MenuComponent
    {
        protected ObjectInfo m_Info;
        protected ObjectID m_ID;
        protected Texture2D m_Texture = null;

        public virtual void Add(MenuComponent menuComponent)
        {
            throw new Exception();
        }
        public virtual void Remove(MenuComponent menuComponent)
        {
            throw new Exception();
        }
        public virtual MenuComponent GetChild(int i)
        {
            throw new Exception();
        }
        public virtual void Clear()
        {
            throw new Exception();
        }
        public virtual MapState GetItemID()
        {
            return MapState.NONE;
        }
        public virtual Texture2D GetTexture()
        {
            return m_Texture;
        }
        public virtual void Update(GameTime gameTime)
        {
        }
        public virtual void Draw(SpriteBatch spriteBatch, GameTime gameTime)
        {
            if (m_Texture != null)
            {
                spriteBatch.Begin();
                spriteBatch.Draw(m_Texture, m_Info.WorldLocation, Color.White);
                spriteBatch.End();
            }
        }
        public virtual bool IsItem()
        {
            throw new Exception();
        }
    }
}
